@echo off
echo === 测试RocketMQ API ===

REM 等待应用启动
echo 等待应用启动...
timeout /t 5 /nobreak > nul

REM 测试健康检查
echo 1. 测试健康检查...
curl -s http://localhost:8080/api/rocketmq/health

REM 测试发送消息
echo.
echo 2. 测试发送消息...
curl -s -X POST http://localhost:8080/api/rocketmq/send -H "Content-Type: application/json" -d "{\"content\": \"测试消息 - %date% %time%\", \"priority\": \"HIGH\"}"

REM 测试批量发送
echo.
echo 3. 测试批量发送消息...
curl -s -X POST http://localhost:8080/api/rocketmq/send-batch -H "Content-Type: application/json" -d "{\"count\": 50}"

REM 等待消息处理
echo.
echo 等待消息处理...
timeout /t 10 /nobreak > nul

REM 查看统计信息
echo.
echo 4. 查看消息统计...
curl -s http://localhost:8080/api/rocketmq/stats

echo.
echo === 测试完成 ===
pause

